package com.antdesignbackend.backend.service.impl;

import com.antdesignbackend.backend.entity.Cabinet;
import com.antdesignbackend.backend.entity.entityVo.CabinetVo;
import com.antdesignbackend.backend.mapper.CabinetMapper;
import com.antdesignbackend.backend.service.CabinetService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class CabinetServiceImpl extends ServiceImpl<CabinetMapper, Cabinet> implements CabinetService {
    @Autowired
    CabinetMapper cabinetMapper;
    public List<CabinetVo> search(@Param(Constants.WRAPPER) QueryWrapper<CabinetVo> queryWrapper, Page<CabinetVo> page){
        return cabinetMapper.search(queryWrapper,page);
    };
    public Integer count(@Param(Constants.WRAPPER) QueryWrapper<CabinetVo> queryWrapper){
        return cabinetMapper.count(queryWrapper);
    };
}
